﻿#include<QCoreApplication>
#include"newCreatItem.hpp"
#include"ControslHead.hpp"
using namespace ribbonStyleControls::Controls;
newCreatitem::newCreatitem(QWidget*par)
    :itemWidget(par)
{
    setMinimumSize(508, 667);
    setStyleSheet("background-color: white;");
    QLabel* labe = new QLabel;
    labe->setText(u8"最近使用的文件");
    QVBoxLayout* layout = new QVBoxLayout(this);
    layout->setSpacing(0);
    layout->setMargin(0);
    layout->addWidget(labe);

    QListWidget* listwidget = new QListWidget();
    listwidget->addItem("Item 1");
    listwidget->addItem("Item 2");

    layout->addWidget(listwidget);

    QPushButton* pushbutton = new QPushButton(u8"确认");
    
    layout->addWidget(pushbutton);
    connect(pushbutton, &QPushButton::clicked, [&]() {qDebug() << "clicked"; QCoreApplication::sendEvent(this, new QEvent(ToolButtonHidePopUp2)); });//
    this->setLayout(layout);
}

